﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace CoreEx.Database.Linq
{
    /// <summary>
    /// Represents a class that is capable of determining the target <see cref="IQueryable"/> instance 
    /// from an <see cref="Expression"/>
    /// </summary>
    public interface IQueryableResolver
    {
        /// <summary>
        /// Returns the first occurrence of an <see cref="IQueryable"/> instance contained in a <see cref="ConstantExpression"/>.
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        IQueryable ResolveFrom(Expression expression);
    }
}
